package com.xiyu.service.service.infra.data;

import com.xiyu.service.model.infra.rate.InfraExchangeRate;
import com.xiyu.service.repository.infra.rate.InfraExchangeRateRepository;
import com.xiyu.service.vo.infra.data.rate.RateListQueryOutput;
import org.springframework.stereotype.Service;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.babyfish.jimmer.Page;
import java.util.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.transaction.annotation.Transactional;
import java.io.IOException;
import com.xiyu.service.util.entity.EntityUtils;
import org.babyfish.jimmer.DraftObjects;
import com.xiyu.service.framework.web.web.core.pojo.PageResult;
import com.xiyu.service.convert.infra.data.RateConvert;

import static com.xiyu.service.framework.exception.util.ServiceExceptionUtil.exception;
import static com.xiyu.service.errorCode.infra.data.RateErrorCode.*;

/**
 * 货币汇率 Service 实现类
 */
@Service
@Validated
public class RateServiceImpl implements RateService {

    @Resource
    private InfraExchangeRateRepository infraExchangeRateRepository;




    @Override
    public List<RateListQueryOutput> listQuery() {
        List<InfraExchangeRate> listInfraExchangeRate = infraExchangeRateRepository.listQuery();
        return RateConvert.INSTANCE.listQueryOutputConvert(listInfraExchangeRate);

    }

}